package afternoon;

import java.util.Scanner;

public class Try_Catch_sum {


    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        while (true) {
            try {
                System.out.println("请输入一个分数");
                int score = scanner.nextInt();
                if (score < 0 || score > 100) {

                 throw new Try_Catch_Fu("你输入的"+score+"有误请重新输入");

                }
                System.out.println(score);
                break;
            } catch (Try_Catch_Fu e) {
                System.out.println("你输入的内容出现了"+e.getMessage()+"问题");
            }
        }

    }
}
